<?php 
$edno = "";
$pet = "";
$oper = "";
$result = "";

if(isset($_POST['submit']))
{
	$edno = $_POST['edno'];
	$dve = $_POST['dve'];
	$oper = $_POST['operation'];
	$result = 0;
	
	if($oper == "+")
	{
		$result = $edno + $dve;
	}
}
?>

<html>
<head>
	<title>Exercise 1</title>
</head>
<body>
	<form method="post" action="exercise1.php">
		<p>
			<input name="edno" value="<?php echo $edno;?>"/>
			<select name="operation">
				<option value="+">+</option>
				<option value="-">-</option>
				<option value="/">/</option>
				<option value="*">*</option>
			</select> 
			<input name="dve" value="<?php echo $dve;?>"/>		
			<input type="submit" value="Calculate" name="submit"/>
		</p>
		<p>Result: <input value="<?php echo $result;?>"/></p>
	</form>
	<?php 
	
	?>
</body>
</html>